<?php
// +----------------------------------------------------------------------------
// | Tke团队版权所属 [三十年河东三十年河西,莫欺少年穷.!]
// +----------------------------------------------------------------------------
// | Copyright (c) 2014 http://www.itdaodan.com All rights reserved.
// +----------------------------------------------------------------------------
// | Author: PHP@妖孽 <dino_ma@163.com>
// +----------------------------------------------------------------------------
/**
 +------------------------------------------------------------------------------
* 支付驱动订单层
+------------------------------------------------------------------------------
* @version   1.0
* @since 2014-12-11
+------------------------------------------------------------------------------
*/
namespace Think\Pay;

class PayVo {

    protected $_orderNo;
    protected $_fee;
    protected $_title;
    protected $_body;
    protected $_callback;
    protected $_url;
    protected $_param;
    protected $_client_orderNo;

    /**
     * 设置订单号
     * @param type $order_no
     * @return \Think\Pay\PayVo
     */
    public function setOrderNo($order_no) {
        $this->_orderNo = $order_no;
        return $this;
    }
	
    /**
     * @todo 外联订单号
     * @param type $_client_orderNo
     * @return \Think\Pay\PayVo
     */
    public function setClientOrderNo($client_order_no){
    	$this->_client_orderNo = $client_order_no;
    	return $this;
    }
    
    /**
     * @todo 获取外联订单号
     * @param return string
     */
    public function getClientOrderNo(){
    	return $this->_client_orderNo;
    }
    
    /**
     * 设置商品价格
     * @param type $fee
     * @return \Think\Pay\PayVo
     */
    public function setFee($fee) {
        $this->_fee = $fee;
        return $this;
    }

    /**
     * 设置商品名称
     * @param type $title
     * @return \Think\Pay\PayVo
     */
    public function setTitle($title) {
        $this->_title = $title;
        return $this;
    }

    /**
     * 设置商品描述
     * @param type $body
     * @return \Think\Pay\PayVo
     */
    public function setBody($body) {
        $this->_body = $body;
        return $this;
    }

    /**
     * 设置支付完成后的后续操作接口
     * @param type $callback
     * @return \Think\Pay\PayVo
     */
    public function setCallback($callback) {
        $this->_callback = $callback;
        return $this;
    }

    /**
     * 设置支付完成后的跳转地址
     * @param type $url
     * @return \Think\Pay\PayVo
     */
    public function setUrl($url) {
        $this->_url = $url;
        return $this;
    }

    /**
     * 设置订单的额外参数
     * @param type $param
     * @return \Think\Pay\PayVo
     */
    public function setParam($param) {
        $this->_param = $param;
        return $this;
    }

    /**
     * 获取订单号
     * @return type
     */
    public function getOrderNo() {
        return $this->_orderNo;
    }

    /**
     * 获取商品价格
     * @return type
     */
    public function getFee() {
        return $this->_fee;
    }

    /**
     * 获取商品名称
     * @return type
     */
    public function getTitle() {
        return $this->_title;
    }

    /**
     * 获取支付完成后的后续操作接口
     * @return type
     */
    public function getCallback() {
        return $this->_callback;
    }

    /**
     * 获取支付完成后的跳转地址
     * @return type
     */
    public function getUrl() {
        return $this->_url;
    }

    /**
     * 获取商品描述
     * @return type
     */
    public function getBody() {
        return $this->_body;
    }

    /**
     * 获取订单的额外参数
     * @return type
     */
    public function getParam() {
        return $this->_param;
    }
    
    
    /**
     * 设置client 渠道id
     * @return type
     */
    public function setAuthId($auth_id) {
    	$this->_auth_id = $auth_id;
        return $this;
    }
    
    /**
     * 获取client 渠道id
     * @return type
     */
    public function getAuthId() {
    	return $this->_auth_id;
    }
    
    /**
     * 设置支付 渠道id
     * @return type
     */
    public function setChannelId($channel_id) {
    	$this->_channel_id = $channel_id;
    	return $this;
    }
    
    /**
     * 获取支付 渠道id
     * @return type
     */
    public function getChannelId() {
    	return $this->_channel_id;
    }
    
    
    /**
     * 设置微信用户的openId
     * @return type
     */
    public function setOpenId($open_id) {
    	$this->_open_id = $open_id;
    	return $this;
    }
    
    /**
     * 获取微信用户的openId
     * @return type
     */
    public function getOpenId() {
    	return $this->_open_id;
    }
}
